home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / DNet / DURL.h < prev   
Text File  |  1996-07-05  |  731b  |  42 lines

  1. // DURL.h
  2. // by D. Gilbert, Sep 94
  3.  
  4. #ifndef __DURL__
  5. #define __DURL__
  6.  
  7.  
  8. class        DNetOb;
  9.  
  10. class DURL : public DObject {
  11. public:
  12.  
  13.     enum {
  14.         alphaChars     = 1,
  15.         alphaPlusChars = 2,
  16.         pathChars    = 4,
  17.         HEX_ESCAPE     = '%'
  18.         };
  19.     
  20.     enum Parts {
  21.         kPartNone = 0,
  22.         kPartProtocol = 1,
  23.         kPartHost = 2,
  24.         kPartPort = 4,
  25.         kPartPath = 8
  26.         };
  27.             
  28.     static short IsURL( const char *line, char*& url, long maxline = 0);
  29.     static Boolean ParseURL( DNetOb* nob, const char *url, long urlsize = 0, 
  30.                     Boolean verbatim = true);
  31.     static char* EncodeChars( const char* str, unsigned char mask = pathChars);
  32.     static char* DecodeChars( char * str);
  33.     static char* GetParts( const char* url, long whichparts, long urlsize = 0);
  34.     
  35.     DURL();    
  36.     
  37. };
  38.  
  39.  
  40. #endif
  41.  
  42.